<template>
  <div style="text-align: left; margin-top: 10px">
    <!-- <el-dropdown>
            <el-button type="primary">
                分类<i class="selRole"></i>
            </el-button>
            <el-dropdown-menu slot="dropdown">
                <el-dropdown-item>分类编号</el-dropdown-item>
                <el-dropdown-item>分类名称</el-dropdown-item>
                <el-dropdown-item>上级分类</el-dropdown-item>
                <el-dropdown-item>其他说明</el-dropdown-item>
            </el-dropdown-menu>
            
    </el-dropdown> -->
    <el-button type="button" id="btnSearch" class="btn-primary">
      <span class="glyphicon glyphicon-search" /> 检索 Search
    </el-button>
    <el-main style="padding-left: 0px; padding-top: 0px">
      <el-table :data="Users" border style="width: 100%">
        <el-table-column prop="code" label="分类编号" width="200px">
        </el-table-column>
        <el-table-column prop="namecn" label="分类名称" width="200px">
        </el-table-column>
        <el-table-column
          prop="id"
          label="上级分类"
          width="200px"
        ></el-table-column>
        <el-table-column
          prop="comment"
          label="其他说明"
          width="200px"
        ></el-table-column>

        <!-- <el-table-column label="操作" width="240px">
                <template slot-scope="scope">
                    <el-button style="padding: 3px,4px,3px,4px; margin: 2px;" @click="update">修改</el-button>
                    <el-button style="padding: 3px,4px,3px,4px; margin: 2px;" @click="delUser">删除</el-button>
                </template>
            </el-table-column> -->
      </el-table>
    </el-main>
  </div>
</template>
<script>
export default {
  name: "lingshi.vue",
  data() {
    return {
      formInline: {
        selTypeList: "",
        tbxNamecn: "",
      },
      Users: [],
    };
  },
  created() {
    this.getJson();
  },
  methods: {
    onSubmit() {
      console.log("submit!");
    },

    getJson() {
      var url = "http://121.37.241.58:8883/logic/baseInfo/category/find";
      // this.$axios.get("static/User.json").then(res => {
      //   this.Users = res.data;
      //     });
      console.log("数据加载");
      this.$axios.post(url).then((res) => {
        // console.log("获取表格");
        console.log(res.data);
        this.Users = res.data;
      });
    },
  },
};
</script>